Integrand size = 31, antiderivative size = 122 \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=-\frac {\arctan \left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac {\arctan \left (\sqrt {3}+\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}-\frac {\sqrt {3} \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {1183, 648, 631, 210, 642} \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=-\frac {\arctan \left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac {\arctan \left (\frac {2 x}{\sqrt [4]{a}}+\sqrt {3}\right )}{2 \sqrt [4]{a}}-\frac {\sqrt {3} \log \left (-\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt [4]{a}} \]
[In]
[Out]
Rule 210
Rule 631
Rule 642
Rule 648
Rule 1183
Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {2 \sqrt {3} a^{3/4}-3 \sqrt {a} x}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt {3} a^{3/4}}+\frac {\int \frac {2 \sqrt {3} a^{3/4}+3 \sqrt {a} x}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt {3} a^{3/4}} \\ & = \frac {1}{4} \int \frac {1}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx+\frac {1}{4} \int \frac {1}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx-\frac {\sqrt {3} \int \frac {-\sqrt {3} \sqrt [4]{a}+2 x}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \int \frac {\sqrt {3} \sqrt [4]{a}+2 x}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt [4]{a}} \\ & = -\frac {\sqrt {3} \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\text {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1-\frac {2 x}{\sqrt {3} \sqrt [4]{a}}\right )}{2 \sqrt {3} \sqrt [4]{a}}-\frac {\text {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1+\frac {2 x}{\sqrt {3} \sqrt [4]{a}}\right )}{2 \sqrt {3} \sqrt [4]{a}} \\ & = -\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac {\tan ^{-1}\left (\sqrt {3}+\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}-\frac {\sqrt {3} \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.10 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.94 \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=\frac {\sqrt [4]{-1} \left (-\sqrt {i+\sqrt {3}} \left (3 i+\sqrt {3}\right ) \arctan \left (\frac {(1+i) x}{\sqrt {-i+\sqrt {3}} \sqrt [4]{a}}\right )+\sqrt {-i+\sqrt {3}} \left (-3 i+\sqrt {3}\right ) \text {arctanh}\left (\frac {(1+i) x}{\sqrt {i+\sqrt {3}} \sqrt [4]{a}}\right )\right )}{2 \sqrt {6} \sqrt [4]{a}} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.74
method | result | size |
default | \(\frac {\frac {\sqrt {3}\, \ln \left (x^{2}+a^{\frac {1}{4}} x \sqrt {3}+\sqrt {a}\right )}{2}+\arctan \left (\frac {2 x +a^{\frac {1}{4}} \sqrt {3}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {1}{4}}}+\frac {-\frac {\sqrt {3}\, \ln \left (x^{2}-a^{\frac {1}{4}} x \sqrt {3}+\sqrt {a}\right )}{2}+\arctan \left (\frac {2 x -a^{\frac {1}{4}} \sqrt {3}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {1}{4}}}\) | \(90\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 251 vs. \(2 (84) = 168\).
Time = 0.27 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.06 \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} \log \left (\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} \log \left (-\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} \log \left (\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} \log \left (-\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} + x\right ) \]
[In]
[Out]
Exception generated. \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=\text {Exception raised: PolynomialError} \]
[In]
[Out]
\[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=\int { -\frac {x^{2} - 2 \, \sqrt {a}}{x^{4} - \sqrt {a} x^{2} + a} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Time = 14.21 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.30 \[ \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx=2\,\mathrm {atanh}\left (x\,\sqrt {\frac {1}{8\,\sqrt {a}}-\frac {\sqrt {-27\,a^3}}{24\,a^2}}-\frac {9\,a^{3/2}\,x\,\sqrt {\frac {1}{8\,\sqrt {a}}-\frac {\sqrt {-27\,a^3}}{24\,a^2}}}{\sqrt {-27\,a^3}}\right )\,\sqrt {\frac {1}{8\,\sqrt {a}}-\frac {\sqrt {-27\,a^3}}{24\,a^2}}+2\,\mathrm {atanh}\left (x\,\sqrt {\frac {\sqrt {-27\,a^3}}{24\,a^2}+\frac {1}{8\,\sqrt {a}}}+\frac {9\,a^{3/2}\,x\,\sqrt {\frac {\sqrt {-27\,a^3}}{24\,a^2}+\frac {1}{8\,\sqrt {a}}}}{\sqrt {-27\,a^3}}\right )\,\sqrt {\frac {\sqrt {-27\,a^3}}{24\,a^2}+\frac {1}{8\,\sqrt {a}}} \]
[In]
[Out]